package LawsonTransformJava.xref;

import java.io.IOException;
import java.sql.SQLException;

public class XrefUnionCode extends CrossRef {

	private final static String TABLE_NAME = "xUNIONCODE";
	static final String XLATE_ERROR = "UC_ERROR";

	public XrefUnionCode(boolean allowBlanks) throws SQLException, IOException {
		stmt = xref.getDataStatement();
		rslt = stmt.executeQuery("SELECT * FROM " + TABLE_NAME);
		super.XLATE_ERROR=XLATE_ERROR;
		super.allowBlanks = allowBlanks;
		while (rslt.next()) {
			// The following should get the appropriate column from the Xref Table
			String old = rslt.getString(1);
			String newX = rslt.getString(2);
			values.put(old, newX);
		}
		//Release the JDBC recourses
		super.close();
	}
}
